package java_objects.method_arguments;

public class DoChangeName2 {
	
	public static void foo(Dog d) {
	    d = new Dog();
		d.name = "Alpha";
	}
	public static void main(String[] args) {
		Dog aDog = new Dog("Max");
		// at this point, aDog points to the "Max" dog
		aDog.print();
		
		foo(aDog);
		// aDog still points to the "Max" dog
		aDog.print();
	}
}
